home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Software Vault: The Gold Collection
/
Software Vault - The Gold Collection (American Databankers) (1993).ISO
/
cdr50
/
pbc22b.zip
/
PBC$BAS.ZIP
/
STRSQU3.BAS
< prev
next >
Wrap
BASIC Source File
|
1993-01-01
|
2KB
|
50 lines
' +----------------------------------------------------------------------+
' | |
' | PBClone Copyright (c) 1990-1993 Thomas G. Hanlin III |
' | |
' +----------------------------------------------------------------------+
SUB StrSqu3 (St$, Result$)
s$ = St$
x$ = ". ththeinghe ed to anng nd a andto of waof as "
x$ = x$ + " inwasat beer re e ther ha hein ered t it...hatt te a"
x$ = x$ + "tha I it ly is ents ae wall co, at wen Iut foraten t"
x$ = x$ + "ion wiyouon e steran fo yome t a we ma hior es nover"
x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
x$ = x$ + "e oe h asve s, stll hade me, on li don'tevese ecte c"
x$ = x$ + "note b Thoute pld ati.. , t't mot ite oulot d b pr leuldt o"
code% = 128
DO
a$ = LEFT$(x$, 3)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
LOOP WHILE i%
x$ = MID$(x$, 4)
code% = code% + 1
LOOP WHILE LEN(x$)
IF LEN(Result$) THEN MID$(Result$, 1) = s$
END SUB
SUB StrSquLen3 (St$, ResultLen)
s$ = St$
x$ = ". ththeinghe ed to anng nd a andto of waof as "
x$ = x$ + " inwasat beer re e ther ha hein ered t it...hatt te a"
x$ = x$ + "tha I it ly is ents ae wall co, at wen Iut foraten t"
x$ = x$ + "ion wiyouon e steran fo yome t a we ma hior es nover"
x$ = x$ + "hisad s td ath thiThe wh soomeithourwittio retedst n a"
x$ = x$ + "e oe h asve s, stll hade me, on li don'tevese ecte c"
x$ = x$ + "note b Thoute pld ati.. , t't mot ite oulot d b pr leuldt o"
code% = 128
DO
a$ = LEFT$(x$, 3)
DO
i% = INSTR(s$, a$)
IF i% THEN s$ = LEFT$(s$, i% - 1) + CHR$(code%) + MID$(s$, i% + 3)
LOOP WHILE i%
x$ = MID$(x$, 4)
code% = code% + 1
LOOP WHILE LEN(x$)
ResultLen% = LEN(s$)
END SUB